<?php
if (!defined("EXE"))
{
	echo "khong co quyen truy xuat";
	exit;	
}


$loai = utils::getIndex("idloai");
$result= $obj->query("select * from loaisanpham,sanpham where loaisanpham.maloai=sanpham.maloai ");

echo "Tổng: ". $obj->getRowCount()." Sản Phẩm";
?>

<div class="product-list-content">
	<?php 
	foreach($result as $row)
	{
                
         
	?>
    <div class="m-product-item">
		<div class="product-pic">
            <a class="product-image" href="<?php echo BASE_URL;?>index.php?mod=product&ac=chitiet&idpro=<?php echo $row["masp"];?>" >
                <img src="
					<?php echo BASE_URL;?>images/sanpham/<?php echo $row["Macha"];?>/<?php echo $row["maloai"];?>/<?php echo $row["hinh"];?>"/>
            </a>
		</div>
        
		<!--<div class="sale-item">-60%</div>-->		
		<div class="price-block">
			<p class="product-name"><?php echo $row["tensp"];?></p>
			<p><?php echo $row["dongia"];?>K</p>
        </div>
	</div>
    <?php	
	}
	?>
</div>